package com.abcode.test.springbootmybatisplus.gen.param;

import com.abcode.test.springbootmybatisplus.gen.entity.UserDetailsInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 德州扑克用户详细信息表(UserDetailsInfo)参数类
 *
 * @author abcode
 * @since 2025-06-27 23:27:19
 */
@Schema(description = "德州扑克用户详细信息表参数实体")
@Data
public class UserDetailsInfoParam {

    public interface QueryGroup {
    }

    public interface EditGroup extends Default {
    }

    public interface AddGroup extends Default {
    }

    /**
     * 外键
     */
    @NotNull(message = "【外键】不能为NUll", groups = EditGroup.class)
    @Schema(title = "外键")
    private Integer userId;

    @Schema(title = "${column.comment}")
    private String nikeName;

    /**
     * 旧的名字
     */
    @Schema(title = "旧的名字")
    private String oldNikeName;

    /**
     * 头像
     */
    @Schema(title = "头像")
    private String head;

    /**
     * 性别（0男1女）
     */
    @Schema(title = "性别（0男1女）")
    private Integer sex;

    /**
     * 筹码
     */
    @NotNull(message = "【筹码】不能为NUll", groups = AddGroup.class)
    @Schema(title = "筹码")
    private Long chip;

    /**
     * 胜局
     */
    @Schema(title = "胜局")
    private Integer win;

    /**
     * 负局
     */
    @Schema(title = "负局")
    private Integer lose;

    /**
     * 最大手牌
     */
    @Schema(title = "最大手牌")
    private String nutHand;

    /**
     * 最高拥有筹码
     */
    @Schema(title = "最高拥有筹码")
    private Integer highestHave;

    /**
     * 最大手牌类型1-10
     */
    @Schema(title = "最大手牌类型1-10")
    private Integer nutHandType;

    /**
     * 最大赢取
     */
    @Schema(title = "最大赢取")
    private Integer maxWin;

    /**
     * 用户每天可以免费领取两次筹码
     */
    @Schema(title = "用户每天可以免费领取两次筹码")
    private Integer freeGet;

    /**
     * 游戏场积分
     */
    @Schema(title = "游戏场积分")
    private Integer gameIntegral;

    /**
     * 比赛场积分
     */
    @Schema(title = "比赛场积分")
    private Integer matchIntegral;

    /**
     * 周积分
     */
    @Schema(title = "周积分")
    private Integer weeksIntegral;

    /**
     * 月积分
     */
    @Schema(title = "月积分")
    private Integer monthIntegral;

    /**
     * 0普通用户，>0 为机器人
     */
    @Schema(title = "0普通用户，>0 为机器人")
    private Integer roomPersionType;

    /**
     * 1 一号服务器 2二号服务器类推
     */
    @Schema(title = "1 一号服务器 2二号服务器类推")
    private Integer roomId;

    /**
     * 机器人I豆
     */
    @Schema(title = "机器人I豆")
    private Integer idou;

    /**
     * 当天累计玩了几局
     */
    @Schema(title = "当天累计玩了几局")
    private Integer addUpCount;

    /**
     * 当天累计玩了多长时间
     */
    @Schema(title = "当天累计玩了多长时间")
    private Integer addUpTime;

    /**
     * 当天累计赢的次数
     */
    @Schema(title = "当天累计赢的次数")
    private Integer winningCount;

    /**
     * 入池数
     */
    @NotNull(message = "【入池数】不能为NUll", groups = AddGroup.class)
    @Schema(title = "入池数")
    private Long poolCnt;

    /**
     * 入池并赢牌数
     */
    @NotNull(message = "【入池并赢牌数】不能为NUll", groups = AddGroup.class)
    @Schema(title = "入池并赢牌数")
    private Long poolWinCnt;

    /**
     * 总手数
     */
    @NotNull(message = "【总手数】不能为NUll", groups = AddGroup.class)
    @Schema(title = "总手数")
    private Long handCnt;

    /**
     * 总局数
     */
    @NotNull(message = "【总局数】不能为NUll", groups = AddGroup.class)
    @Schema(title = "总局数")
    private Long gameCnt;

    /**
     * 0,正式用户，1游客用户
     */
    @Schema(title = "0,正式用户，1游客用户")
    private Integer userType;

    /**
     * 上一次用户读取到的新消息ID
     */
    @Schema(title = "上一次用户读取到的新消息ID")
    private Integer upMsgId;

    /**
     * 最大7次 联系登录次数
     */
    @Schema(title = "最大7次 联系登录次数")
    private Integer dayIndex;

    /**
     * 当天第一次登录的时间
     */
    @Schema(title = "当天第一次登录的时间")
    private LocalDateTime dayLoginDate;

    /**
     * 生日
     */
    @Schema(title = "生日")
    private LocalDate birthday;

    /**
     * 个性签名
     */
    @NotBlank(message = "【个性签名】不能为空", groups = AddGroup.class)
    @Schema(title = "个性签名")
    private String personSign;

    /**
     * 累计修改昵称次数
     */
    @NotNull(message = "【累计修改昵称次数】不能为NUll", groups = AddGroup.class)
    @Schema(title = "累计修改昵称次数")
    private Integer modifyNameTimes;

    /**
     * 修改头像次数
     */
    @Schema(title = "修改头像次数")
    private Integer modifyHeadTime;

    /**
     * 手机号
     */
    @Schema(title = "手机号")
    private String phone;

    /**
     * 国家
     */
    @Schema(title = "国家")
    private String country;

    /**
     * 城市
     */
    @Schema(title = "城市")
    private String city;

    /**
     * 省份
     */
    @Schema(title = "省份")
    private String province;

    /**
     * 收藏牌谱数
     */
    @Schema(title = "收藏牌谱数")
    private Integer spectrumCnt;

    /**
     * 大厅币
     */
    @NotNull(message = "【大厅币】不能为NUll", groups = AddGroup.class)
    @Schema(title = "大厅币")
    private Integer coin;

    /**
     * å¯†ç 
     */
    @Schema(title = "å¯†ç ")
    private String password;

    @Schema(title = "${column.comment}")
    private Integer payPwdErrorTime;

    @Schema(title = "${column.comment}")
    private String payPassword;

    @Schema(title = "${column.comment}")
    private Integer payPwdStatus;

    @Schema(title = "${column.comment}")
    private Long payPwdLockTime;

    @Schema(title = "${column.comment}")
    private String picFrame;

    /**
     * 头像框过期时间
     */
    @Schema(title = "头像框过期时间")
    private Long picEffectiveTime;

    @Schema(title = "${column.comment}")
    private Long honorNum;

    @Schema(title = "${column.comment}")
    private Integer verifyCode;

    /**
     * éªŒè¯ç ç”Ÿæˆæ—¶é—´
     */
    @Schema(title = "éªŒè¯ç ç”Ÿæˆæ—¶é—´")
    private String sendCodeTime;

    /**
     * 随机id
     */
    @Schema(title = "随机id")
    private String randomNum;

    /**
     * 创建日期
     */
    @Schema(title = "创建日期")
    private LocalDateTime ctime;

    /**
     * 构建数据库实体类
     *
     * @return
     */
    public UserDetailsInfo toEntity() {
        UserDetailsInfo entity = new UserDetailsInfo();

        entity.setUserId(this.userId);
        entity.setNikeName(this.nikeName);
        entity.setOldNikeName(this.oldNikeName);
        entity.setHead(this.head);
        entity.setSex(this.sex);
        entity.setChip(this.chip);
        entity.setWin(this.win);
        entity.setLose(this.lose);
        entity.setNutHand(this.nutHand);
        entity.setHighestHave(this.highestHave);
        entity.setNutHandType(this.nutHandType);
        entity.setMaxWin(this.maxWin);
        entity.setFreeGet(this.freeGet);
        entity.setGameIntegral(this.gameIntegral);
        entity.setMatchIntegral(this.matchIntegral);
        entity.setWeeksIntegral(this.weeksIntegral);
        entity.setMonthIntegral(this.monthIntegral);
        entity.setRoomPersionType(this.roomPersionType);
        entity.setRoomId(this.roomId);
        entity.setIdou(this.idou);
        entity.setAddUpCount(this.addUpCount);
        entity.setAddUpTime(this.addUpTime);
        entity.setWinningCount(this.winningCount);
        entity.setPoolCnt(this.poolCnt);
        entity.setPoolWinCnt(this.poolWinCnt);
        entity.setHandCnt(this.handCnt);
        entity.setGameCnt(this.gameCnt);
        entity.setUserType(this.userType);
        entity.setUpMsgId(this.upMsgId);
        entity.setDayIndex(this.dayIndex);
        entity.setDayLoginDate(this.dayLoginDate);
        entity.setBirthday(this.birthday);
        entity.setPersonSign(this.personSign);
        entity.setModifyNameTimes(this.modifyNameTimes);
        entity.setModifyHeadTime(this.modifyHeadTime);
        entity.setPhone(this.phone);
        entity.setCountry(this.country);
        entity.setCity(this.city);
        entity.setProvince(this.province);
        entity.setSpectrumCnt(this.spectrumCnt);
        entity.setCoin(this.coin);
        entity.setPassword(this.password);
        entity.setPayPwdErrorTime(this.payPwdErrorTime);
        entity.setPayPassword(this.payPassword);
        entity.setPayPwdStatus(this.payPwdStatus);
        entity.setPayPwdLockTime(this.payPwdLockTime);
        entity.setPicFrame(this.picFrame);
        entity.setPicEffectiveTime(this.picEffectiveTime);
        entity.setHonorNum(this.honorNum);
        entity.setVerifyCode(this.verifyCode);
        entity.setSendCodeTime(this.sendCodeTime);
        entity.setRandomNum(this.randomNum);
        entity.setCtime(this.ctime);

        return entity;
    }

}
